﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using fsw.Common;
using System.Text;
namespace fsw.Web.Card
{
    public partial class CardClick : Web.UI.ManagePage
    {
        protected Model.Admin model_admin;//登录用户名
        private string _PicPath = string.Empty;
        private string _PicName = string.Empty;
        private int _TypeId = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            model_admin = GetAdminInfo();
            this._PicPath = DTRequest.GetFormString("PicPath");
            this._PicName = DTRequest.GetFormString("PicName");
            this._TypeId = DTRequest.GetFormInt("TypeId");
            if (!Page.IsPostBack) GetCount();
        }
        /// <summary>
        /// 次数
        /// </summary>
        private void GetCount()
        {
            BLL.Admin_Pic bll = new BLL.Admin_Pic();
            string _strNum = string.Empty;
            if (this._TypeId > 0)
            {
                _strNum = bll.GetCount(this._PicPath, this._PicName, this._TypeId);
            }
            else
            {
                if (model_admin.TypeId == 1)
                    _strNum = bll.Get_TypeId_Count(this._PicPath, this._PicName);
                else
                    _strNum = bll.GetTypeidCount(this._PicPath, this._PicName);
            }
            Response.Write(_strNum);
        }
    }
}